<?php
/**
 * 简单工厂模式----设计模式
 * Created by Jason.
 * User: Administrator
 * Date: 2019/12/7 0007
 * Time: 下午 2:50
 */

namespace app\index\service;

use app\index\interfaces\Product;

class FactoryProduct
{
    public function createShippableProduct(int $price,int $shipping_costs): Product
    {
        return new ShippableProduct($price, $shipping_costs);
    }
    public function createDigitalProduct(int $price): Product
    {
        return new DigitalProduct($price);
    }
}